Skip to content

Codex mcp instructions#719

Merged
coleam00 merged 2 commits intomainfrom
codex-mcp-instructions
Sep 20, 2025
Merged

Codex mcp instructions#719
coleam00 merged 2 commits intomainfrom
codex-mcp-instructions

Conversation

@coleam00
Copy link
Copy Markdown
Owner

@coleam00 coleam00 commented Sep 20, 2025

Pull Request

Summary

Added instructions to the MCP tab in the Archon UI for connecting the Archon MCP server to Codex.

Changes Made

  • Updated the MCP list in Archon to include Codex + instructions for connecting it
  • Removed Augment since it works the same as Cursor and we ran out of space in the UI for listing the different AI coding assistants

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Affected Services

  • Frontend (React UI)
  • Server (FastAPI backend)
  • MCP Server (Model Context Protocol)
  • Agents (PydanticAI service)
  • Database (migrations/schema)
  • Docker/Infrastructure
  • Documentation site

Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested affected user flows
  • Docker builds succeed for all services

Checklist

  • My code follows the service architecture patterns
  • If using an AI coding assistant, I used the CLAUDE.md rules
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass locally
  • My changes generate no new warnings
  • I have updated relevant documentation
  • I have verified no regressions in existing features

Summary by CodeRabbit

  • New Features

    • Added Codex configuration in the MCP UI with its own tab.
    • Platform-specific setup and configuration generation (Windows vs. macOS/Linux).
    • Highlighted install step for npm install -g mcp-remote.
    • Added macOS/Homebrew path note and platform label in the Configuration header.
  • Refactor

    • Removed the Augment option from IDE configurations and UI.
    • Adjusted IDE tab layout from 4 to 3 columns to accommodate the new tab.

coleam00 and others added 2 commits September 20, 2025 14:16
- Added Codex as a supported IDE in the MCP configuration UI
- Removed Augment (duplicate of Cursor configuration)
- Positioned Codex between Gemini and Cursor in the tab order
- Added platform-specific configuration support for Windows vs Linux/macOS
- Includes step-by-step instructions for installing mcp-remote and configuring Codex
- Shows appropriate TOML configuration based on detected platform

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 20, 2025

Walkthrough

Added a new Codex IDE configuration to the MCP config UI, including platform-specific generation (Windows vs non-Windows), guidance, and tab updates. Removed the Augment configuration. Updated types to replace "augment" with "codex" and extended the ideConfigurations entry type with an optional platformSpecific flag.

Changes

Cohort / File(s) Summary
MCP Config UI and Logic
archon-ui-main/src/features/mcp/components/McpConfigSection.tsx
Added Codex entry with steps, platform-specific configGenerator, and UI elements (new tab, 3-column tab grid, platform notes). Highlighted npm install step and added macOS/Homebrew path note. Removed Augment entry and related UI paths. Extended ideConfigurations entry type with optional platformSpecific.
Types: Supported IDEs
archon-ui-main/src/features/mcp/types/mcp.ts
Replaced union member "augment" with "codex" in SupportedIDE; no structural changes beyond the union member swap.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant UI as MCP Config UI
    participant CFG as ideConfigurations
    participant OS as Platform Detector

    U->>UI: Select "Codex" tab
    UI->>CFG: Load Codex config entry
    Note over CFG: platformSpecific = true
    UI->>OS: Detect platform (Windows vs non-Windows)
    OS-->>UI: Platform info
    UI->>CFG: Call configGenerator(config, platform)
    CFG-->>UI: Platform-tailored config text
    UI-->>U: Render steps, npm install highlight, path notes, and config with platform label
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitch my ears at tabs anew,
Codex hops where Augment flew.
Windows burrows, Unix burrows—two!
Paths and notes in tidy queue.
I npm-hop, then sip my brew,
Configs compiled—thump-thump: woo!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description largely follows the repository template and includes a Summary, Changes Made, Type of Change, Affected Services, Testing checklist, and Checklist, but it omits concrete Test Evidence (commands and results), leaves the Breaking Changes section empty despite changes to exported/public types (SupportedIDE and ideConfigurations), and does not confirm whether MCP Server or other services are impacted by those type changes; these omissions are material for reviewers. Please add explicit Test Evidence with the commands run and their outputs, complete the Breaking Changes section describing the public type modifications (SupportedIDE/ideConfigurations) and any migration steps or compatibility notes, and confirm/update the Affected Services and Type of Change (mark as a breaking change if appropriate) or explain why no backend/mcp impact exists; also either add or justify tests for the functional changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Codex mcp instructions" is concise, directly related to the primary change (adding Codex instructions to the MCP UI), and is clear enough for a teammate scanning PR history to understand the main intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex-mcp-instructions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coleam00 coleam00 mentioned this pull request Sep 20, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
archon-ui-main/src/features/mcp/types/mcp.ts (1)

33-39: Type drift: IdeConfiguration lacks platformSpecific; UI defines it inline.

To avoid divergence, define a UI-facing type in the feature types and reuse it.

Apply in this file:

 export interface IdeConfiguration {
   ide: SupportedIDE;
   title: string;
   steps: string[];
   config: string;
   supportsOneClick?: boolean;
 }
+
+// UI definition for MCP IDE configuration blocks
+export interface IdeConfigUiDefinition {
+  title: string;
+  steps: string[];
+  configGenerator: (config: McpServerConfig) => string;
+  supportsOneClick?: boolean;
+  platformSpecific?: boolean;
+}

Then update McpConfigSection.tsx to use IdeConfigUiDefinition (see suggested diff there).

archon-ui-main/src/features/mcp/components/McpConfigSection.tsx (2)

6-6: Centralize the config entry type; avoid inline shape.

Import and use a shared IdeConfigUiDefinition type from the feature’s types to comply with the “types live under src/features/*/types” guideline.

-import type { McpServerConfig, McpServerStatus, SupportedIDE } from "../types";
+import type { McpServerConfig, McpServerStatus, SupportedIDE, IdeConfigUiDefinition } from "../types";
@@
-const ideConfigurations: Record<
-  SupportedIDE,
-  {
-    title: string;
-    steps: string[];
-    configGenerator: (config: McpServerConfig) => string;
-    supportsOneClick?: boolean;
-    platformSpecific?: boolean;
-  }
-> = {
+const ideConfigurations: Record<SupportedIDE, IdeConfigUiDefinition> = {

Also applies to: 15-24


148-156: Ensure --allow-http is passed for non‑HTTPS MCP endpoints (Codex/Cursor/Claude)

mcp-remote requires an explicit --allow-http (or equivalent) for http:// MCP endpoints — add "--allow-http" to the Codex, Cursor, and Claude Code mcp-remote args or ensure those paths use HTTPS.

File: archon-ui-main/src/features/mcp/components/McpConfigSection.tsx — lines 148–156 and 173–177

🧹 Nitpick comments (3)
archon-ui-main/src/features/mcp/components/McpConfigSection.tsx (3)

71-83: Windows TOML example path is brittle.

Hard-coding USERNAME and npm global path will fail for many setups. You already instruct users to run npm root -g; reflect that with a clearer placeholder.

-    'C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/mcp-remote/dist/proxy.js',
+    '<REPLACE_WITH: (npm root -g)/mcp-remote/dist/proxy.js>',

If we want, we can render a short hint below the config showing the resolved npm root for typical Homebrew (/opt/homebrew/...) and Node installer (/usr/local/...) cases.


325-328: Tone down transient product-state wording.

“This setup is complex right now because Codex has some bugs with MCP currently.” can age poorly and sounds accusatory. Prefer neutral wording.

-                according to your system. This setup is complex right now because Codex has some bugs with MCP currently.
+                according to your system. Codex’s MCP support is evolving; paths and setup may vary by platform.

335-342: Reuse platform helper for header label; avoid navigator directly.

Consistent with earlier fix.

-                {selectedIDE === "codex" && (
+                {selectedIDE === "codex" && (
                   <span className="ml-2 text-xs text-yellow-600 dark:text-yellow-400">
-                    ({navigator.platform.toLowerCase().includes("win") ? "Windows" : "Linux/macOS"})
+                    ({isWindowsPlatform() ? "Windows" : "Linux/macOS"})
                   </span>
                 )}

(Add isWindowsPlatform as outlined above.)

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9c08d2 and ed8451b.

📒 Files selected for processing (2)
  • archon-ui-main/src/features/mcp/components/McpConfigSection.tsx (4 hunks)
  • archon-ui-main/src/features/mcp/types/mcp.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
archon-ui-main/src/features/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

archon-ui-main/src/features/**/*.{ts,tsx}: Use TanStack Query for all data fetching (no prop drilling); use smart HTTP polling (no WebSockets)
Biome formatting in features: 120-character line length, double quotes, and trailing commas
Apply Tron-inspired glassmorphism styling with Tailwind for feature UI

Use Biome in features: 120 character line length, double quotes, and trailing commas

Files:

  • archon-ui-main/src/features/mcp/types/mcp.ts
  • archon-ui-main/src/features/mcp/components/McpConfigSection.tsx
archon-ui-main/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Disallow implicit any in TypeScript

archon-ui-main/src/**/*.{ts,tsx}: Frontend TypeScript must use strict mode with no implicit any
Use TanStack Query for all data fetching; avoid prop drilling
Use database values directly in the frontend; avoid mapping layers between BE and FE types

Files:

  • archon-ui-main/src/features/mcp/types/mcp.ts
  • archon-ui-main/src/features/mcp/components/McpConfigSection.tsx
archon-ui-main/src/features/*/types/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Define feature-specific TypeScript types in the feature’s types directory

Define shared types under src/features/[feature]/types

Files:

  • archon-ui-main/src/features/mcp/types/mcp.ts
archon-ui-main/src/**/*.{ts,tsx,py}

📄 CodeRabbit inference engine (CLAUDE.md)

In code comments, avoid meta terms like SIMPLIFIED, ENHANCED, LEGACY, CHANGED, REMOVED; comment only on functionality and reasoning (do not mention beta/global rules)

Files:

  • archon-ui-main/src/features/mcp/types/mcp.ts
  • archon-ui-main/src/features/mcp/components/McpConfigSection.tsx
archon-ui-main/src/features/*/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Place new UI components under the feature’s components directory

Place new UI components under src/features/[feature]/components

Files:

  • archon-ui-main/src/features/mcp/components/McpConfigSection.tsx
🧬 Code graph analysis (1)
archon-ui-main/src/features/mcp/components/McpConfigSection.tsx (2)
archon-ui-main/src/features/ui/primitives/tabs.tsx (3)
  • TabsList (9-18)
  • TabsTrigger (22-86)
  • TabsContent (90-102)
archon-ui-main/src/features/ui/primitives/styles.ts (2)
  • cn (139-141)
  • glassmorphism (12-100)
🔇 Additional comments (4)
archon-ui-main/src/features/mcp/components/McpConfigSection.tsx (3)

259-263: Tabs layout change LGTM.

Grid col update and new Codex tab integrate cleanly.


274-289: Nice UX touch highlighting npm install.

Inline code highlighting improves scannability for Codex steps.


291-299: Good macOS/Homebrew path note.

This should reduce confusion for Apple Silicon setups.

archon-ui-main/src/features/mcp/types/mcp.ts (1)

31-31: Approve — Codex added; address leftover "Augment" usages

export type SupportedIDE = "windsurf" | "cursor" | "claudecode" | "cline" | "kiro" | "codex" | "gemini";
  • No "augment" literal in SupportedIDE, but occurrences remain:
    • archon-ui-main/src/features/mcp/types/mcp.ts: client_type includes "Augment" (line ~17).
    • archon-ui-main/src/features/mcp/components/McpClientList.tsx: icon map includes Augment (line ~18).
  • Remove or normalize these usages (or confirm they intentionally differ from SupportedIDE) and ensure no code still expects SupportedIDE = "augment".

Comment on lines +60 to +95
codex: {
title: "Codex Configuration",
steps: [
"Step 1: Install mcp-remote globally: npm install -g mcp-remote",
"Step 2: Add configuration to ~/.codex/config.toml",
"Step 3: Find your exact mcp-remote path by running: npm root -g",
"Step 4: Replace the path in the configuration with your actual path + /mcp-remote/dist/proxy.js",
],
configGenerator: (config) => {
const isWindows = navigator.platform.toLowerCase().includes("win");

if (isWindows) {
return `[mcp_servers.archon]
command = 'node'
args = [
'C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/mcp-remote/dist/proxy.js',
'http://${config.host}:${config.port}/mcp'
]
env = {
APPDATA = 'C:\\Users\\YOUR_USERNAME\\AppData\\Roaming',
LOCALAPPDATA = 'C:\\Users\\YOUR_USERNAME\\AppData\\Local',
SystemRoot = 'C:\\WINDOWS',
COMSPEC = 'C:\\WINDOWS\\system32\\cmd.exe'
}`;
} else {
return `[mcp_servers.archon]
command = 'node'
args = [
'/usr/local/lib/node_modules/mcp-remote/dist/proxy.js',
'http://${config.host}:${config.port}/mcp'
]
env = { }`;
}
},
platformSpecific: true,
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Guard navigator usage and unify platform detection.

Direct navigator access can break under SSR/tests and detection is duplicated. Add a small helper and reuse it here.

Add once near the top (outside the component):

const isWindowsPlatform = (): boolean =>
  typeof navigator !== "undefined" && /win/i.test(navigator.userAgent || navigator.platform || "");

Then update this block:

-      const isWindows = navigator.platform.toLowerCase().includes("win");
+      const isWindows = isWindowsPlatform();

Also use isWindowsPlatform() where you render the platform label/note (see comments below).

🤖 Prompt for AI Agents
In archon-ui-main/src/features/mcp/components/McpConfigSection.tsx around lines
60 to 95, replace the direct navigator.platform usage with a guarded helper to
avoid SSR/test failures and centralize platform detection: add a top-level
isWindowsPlatform helper that checks typeof navigator !== "undefined" and tests
navigator.userAgent or navigator.platform for "win", then use
isWindowsPlatform() here (and wherever the component renders platform
labels/notes) instead of navigator.platform.toLowerCase().includes("win") so
detection is safe and unified across the file.

Comment on lines +321 to +330
{/* Platform-specific note for Codex */}
{selectedIDE === "codex" && (
<div className={cn("p-3 rounded-lg", glassmorphism.background.yellow, glassmorphism.border.yellow)}>
<p className="text-sm text-yellow-700 dark:text-yellow-300">
<span className="font-semibold">Platform Note:</span> The configuration below shows{" "}
{navigator.platform.toLowerCase().includes("win") ? "Windows" : "Linux/macOS"} format. Adjust paths
according to your system. This setup is complex right now because Codex has some bugs with MCP currently.
</p>
</div>
)}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

glassmorphism.yellow is undefined — styles won’t apply.

styles.ts defines cyan/blue/purple/orange but not yellow. Use an existing color to avoid “undefined” classes.

-            <div className={cn("p-3 rounded-lg", glassmorphism.background.yellow, glassmorphism.border.yellow)}>
+            <div className={cn("p-3 rounded-lg", glassmorphism.background.orange, glassmorphism.border.orange)}>

Also replace navigator usage here with isWindowsPlatform():

-                {navigator.platform.toLowerCase().includes("win") ? "Windows" : "Linux/macOS"} format.
+                {isWindowsPlatform() ? "Windows" : "Linux/macOS"} format.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In archon-ui-main/src/features/mcp/components/McpConfigSection.tsx around lines
321 to 330, replace the undefined glassmorphism.yellow classes with an existing
color (for example glassmorphism.background.orange and
glassmorphism.border.orange) so the styling resolves, and replace the direct
navigator.platform usage with a call to isWindowsPlatform() (and ensure that
helper is imported/available) when choosing the displayed platform string and
the conditional rendering check.

@coleam00 coleam00 merged commit 035f90e into main Sep 20, 2025
16 checks passed
leonj1 pushed a commit to leonj1/Archon that referenced this pull request Oct 13, 2025
* Add Codex MCP configuration instructions

- Added Codex as a supported IDE in the MCP configuration UI
- Removed Augment (duplicate of Cursor configuration)
- Positioned Codex between Gemini and Cursor in the tab order
- Added platform-specific configuration support for Windows vs Linux/macOS
- Includes step-by-step instructions for installing mcp-remote and configuring Codex
- Shows appropriate TOML configuration based on detected platform

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Finalizing Codex instructions

---------

Co-authored-by: Claude <noreply@anthropic.com>
@Wirasm Wirasm deleted the codex-mcp-instructions branch April 6, 2026 07:37
coleam00 pushed a commit that referenced this pull request Apr 7, 2026
The Settings page "Active" count was always 0 for web workflows because
they are fire-and-forget (lock released immediately after dispatch).
Query the DB for workflows with status='running' instead.

Co-authored-by: Thomas Ritter <thomas.ritter@crownpeak.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…oleam00#719)

The Settings page "Active" count was always 0 for web workflows because
they are fire-and-forget (lock released immediately after dispatch).
Query the DB for workflows with status='running' instead.

Co-authored-by: Thomas Ritter <thomas.ritter@crownpeak.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…oleam00#719)

The Settings page "Active" count was always 0 for web workflows because
they are fire-and-forget (lock released immediately after dispatch).
Query the DB for workflows with status='running' instead.

Co-authored-by: Thomas Ritter <thomas.ritter@crownpeak.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant